package conference;

import java.util.Comparator;
/**
 * This is comparison of author. 
 * @author Dan Garrison
 * @version Fall 2011
 *
 */
public class AuthorComparator implements 
					Comparator<Manuscript> {
	/**
	 * Comparing of author.
	 * @param man1 first manuscript
	 * @param man2 second manuscript
	 * @return result the result of comparison 
	 */
	@Override
	public int compare(Manuscript man1, 
			Manuscript man2) {
		int result = man1.
		getAuthor().getLastName().
		compareTo(man2.getAuthor().
		getLastName());

		if (result == 0) {
			result = man1.getAuthor().getFirstName().
			compareTo(man2.getAuthor().getFirstName());
		}
		return result;
	}
}
